package com.example.nginxstudy.demos.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HostController {

    @RequestMapping("/api/host")
    public String host(HttpServletRequest request) {
        return request.getLocalAddr();
    }

}
